﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace User_Imaging
{
    public class SoftwarePackage
    {
        internal String DisplayName = String.Empty;
        internal DateTime InstallDate = DateTime.Now;
        internal String Version = String.Empty;
        internal String ProgramFlags = String.Empty;
        internal String ProgramName = String.Empty;
        internal String winXPCompat = String.Empty;
        internal String win7Compat = String.Empty;
        internal String vendor = String.Empty;
        internal Boolean install = true;
        internal SoftwarePackage(String DisplayName, String InstallDate)
        {
            this.DisplayName = DisplayName;
            String year = InstallDate.Substring(0,4);
            String month = InstallDate.Substring(4,2);
            String day = InstallDate.Substring(6, 2);
            this.InstallDate = Convert.ToDateTime(month + "/" + day + "/" + year);
        }
        internal SoftwarePackage(String DisplayName, String Version, String ProgramFlags, String ProgramName, String winXPCompat, String win7Compat, String vendor)
        {
            this.DisplayName = DisplayName;
            this.Version = Version;
            this.ProgramFlags = ProgramFlags;
            this.ProgramName = ProgramName;
            this.winXPCompat = winXPCompat;
            this.win7Compat = win7Compat;
            this.vendor = vendor;
        }
        public override String ToString()
        {
            return this.vendor + " " + this.DisplayName;
        }
    }
}